package com.ujoku.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.labillusion.core.util.jsonFormat.SimpleDoubleSerializer;

import java.util.Date;

/**
 * Created by Greg.Chen on 2015/2/6.
 */
public class RepurchaseItem {

    private String id;
    private Integer memberId;
    private String memberName;
    private String myListId;
    private String myListItemId;
    private Integer qty;
    @JsonSerialize(using= SimpleDoubleSerializer.class)
    private Double price;
    private Integer goodsId;
    private String goodsName;
    @JsonSerialize(using= SimpleDoubleSerializer.class)
    private Double goodsPrice;
    private Integer status;
    private String statusName;
    private String mediumImage;

    @JsonIgnore
    private Date goodsUpdateTime;

    public Date getGoodsUpdateTime() {
        return goodsUpdateTime;
    }

    public void setGoodsUpdateTime(Date goodsUpdateTime) {
        this.goodsUpdateTime = goodsUpdateTime;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public Double getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(Double goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public String getStatusName() {
        switch (status){
            case RepurchaseStatus.CANCEL:
                return "回购取消";
            case RepurchaseStatus.CREATED:
                return "回购创建";
            case RepurchaseStatus.PRICE_CONFIRM:
                return "回购价格确认";
            case RepurchaseStatus.FINISHED:
                return "回购完成";
        }

        return statusName;
    }

    public Integer getMemberId() {
        return memberId;
    }

    public void setMemberId(Integer memberId) {
        this.memberId = memberId;
    }

    public String getMediumImage() {
        return mediumImage;
    }

    public void setMediumImage(String mediumImage) {
        this.mediumImage = mediumImage;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMyListId() {
        return myListId;
    }

    public void setMyListId(String myListId) {
        this.myListId = myListId;
    }

    public String getMyListItemId() {
        return myListItemId;
    }

    public void setMyListItemId(String myListItemId) {
        this.myListItemId = myListItemId;
    }

    public Integer getQty() {
        return qty;
    }

    public void setQty(Integer qty) {
        this.qty = qty;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
